﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCHeader.ascx.cs" Inherits="NJL.Web.Controls.WUCHeader" %>
<%@ Import Namespace="Royalsoft.Common" %>
<script src="/Scripts/popup_layer.js" type="text/javascript"></script>
<script type="text/javascript">
    function fChangeCity(cityId) {
        $.post('/changefocuscity.aspx', { Action: "post", CityCode: cityId }, function (data, textStatus) { window.location = '/'; });
    }
</script>
<script type="text/javascript">
    function openQQ() {
        var A = window.open("<%=WEBSITE_USRE_DOMAIN %>/logintoqq.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=openwindow", "TencentLogin", "width=450,height=320,menubar=0,scrollbars=0, status=1,titlebar=0,toolbar=0,location=1");
        sessAjax();
    }
    function openRenRen() {
        var A = window.open("<%=WEBSITE_USRE_DOMAIN %>/renrencallback.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=openwindow", "RenRenLogin", "width=860,height=420,menubar=0,scrollbars=0, status=1,titlebar=0,toolbar=0,location=1");
        sessAjax();
    }
    function openSina() {
        var A = window.open("<%=WEBSITE_USRE_DOMAIN %>/logintosina.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=openwindow", "SinaLogin", "width=650,height=420,menubar=0,scrollbars=0, status=1,titlebar=0,toolbar=0,location=1");
        sessAjax();
    }
    function sessAjax() {
        $.ajax({
            type: 'get',
            url: '/Handle/Handler.ashx',
            data: 'sessionUrl=<%=FROM_URL%>&Random=' + Math.random(),
            dataType: 'text',
            success: function (msg) {

            },
            error: function () {

            }
        })
    }
</script>
<!--顶部-->
<div class="fullscreen" id="top">
    <div class="w1003">
        <!--topinfo-->
        <div class="topInfo">
            <%
                if (UserId!=""&&UserName!="")
                {
                  if (Session["usertype"].ToString().Equals("2"))
                  { 
            %>
            <span><a href="/AdminVisitor/Default.aspx" class="bluelink">【个人主页管理】</a></span>|<span><a
                href="/wanjia/<%=Session["userid"]%>-index.html" class="bluelink">【我的主页】</a></span>|
            <%
                  }
                  else if (Session["usertype"].ToString().Equals("3"))
                  { 
            %>
            <span><a href="/AdminVisitor/Default.aspx">【个人主页管理】</a></span>|<span>
                  <a href="/wanjia/<%=Session["userid"]%>-index.html">【我的主页】</a></span>|<span>
                  <a href="/AdminEnterprise/Default.aspx">【商铺管理】</a></span>|<span>
                  <a href="/shangpu/<%=GetCompanyIDByUserID(Session["userid"].ToString())%>-index.html">【我的商铺】</a></span>|
            <%
                  }
                }

            %>
            <span><a target="_blank" href="/xcgc/" class="icon_guangc">乡村广场</a></span>|<span>
            <a href="/" class="icon_index">网站首页</a></span>|
            <span><a target="_blank" rel="nofllow" href="/bzzx/" class="icon_help">帮助中心</a></span>|
            <span class="collect"><a onclick="javascript:fAddFavorites()" rel="nofllow" style="cursor:pointer" class="icon_collect">收藏本站</a></span>
            <script type="text/javascript">
                function fAddFavorites() {
                    var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd' : 'Ctrl';
                    if (document.all) {
                        window.external.addFavorite(window.location, document.title);
                    }
                    else if (window.sidebar) {
                        window.sidebar.addPanel(document.title, window.location);
                    }
                    else {
                        alert('添加失败，请用Ctrl+D进行添加');
                    }
                }
            </script>
        </div>
        <!--登陆-->
        <div class="users">
            <%
                if (Session["userid"] != null)
                {
            %>
            <p>
                您好，<strong><%=Session["username"]%></strong>！&nbsp;&nbsp;<a href="/Logout.aspx?url=<%= Request.RawUrl %>">[退出]</a>
                <%
                    if (Session["usertype"].ToString() == "-1")
                    {
                %>
                &nbsp;&nbsp;为什么看不到我的个人管理呢？<a href="/RegisterActive.aspx">激活账户</a>
                <% 
                    }
                    if (Session["usertype"].ToString() == "0")
                    {
                %>
                &nbsp;&nbsp;为什么看不到我的个人管理呢？<a href="/RegisterTow.aspx">完成注册</a>
                <% 
                    }
                %>
            </p>
            <%
                }
            else
            { 
            %>
            <p>
                您好，欢迎来农家乐网！请&nbsp;<a rel="nofllow" id="aTopLogin" style="cursor:pointer" class="bluelink">登录</a>&nbsp;&nbsp;
                <span class="qq"><a id="aTopLoginQQ" style="cursor:pointer" class="qqtop bluelink"></a></span>
                <span class="qq"><a id="aTopLoginSina" style="cursor:pointer" class="sinatop bluelink"></a></span>
                <span class="qq"><a id="aTopLoginRenren" style="cursor:pointer" class="renrentop bluelink"></a></span>
                <span><a rel="nofllow" target="_blank" href="/Register.aspx" class="bluelink">免费注册</a></span>
                <span><a rel="nofllow" target="_blank" href="/FindPassword.aspx" class="bluelink">找回密码</a></span>
                
              </p>
            <%
                }
            %>
        </div>
    </div>
</div>
<%
    if (UserId == "" || UserName == "")
    {
%>
    <script type="text/javascript">
        var openDivLogin;
        $(document).ready(function () {
            openDivLogin = new PopupLayer({ trigger: "#aTopLogin", popupBlk: "#blkTopLogin", closeBtn: "#aTopLoginClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLogin.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLogin").src = '<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLogin" class="blk">
        <div class="popup_title">
            <span class="f_right"><a href="javascript:void(0)" id="aTopLoginClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a> </li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLogin" name="main" width="500" height="420" style="overflow: hidden;
                border: none;" frameborder="no"></iframe>
        </div>
    </div>
<%
    }
%>

    <!--QQ LOGIN-->
    <script type="text/javascript">
        var openDivLoginQQ;
        $(document).ready(function () {
            openDivLoginQQ = new PopupLayer({ trigger: "#aTopLoginQQ", popupBlk: "#blkTopLoginQQ", closeBtn: "#aTopLoginQQClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLoginQQ.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLoginQQ").src = '<%=WEBSITE_USRE_DOMAIN %>/logintoqq.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=opendiv';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLoginQQ" class="blk" style="width:585px;height:560px">
        <div class="popup_title">
            <span class="f_right"><a href="javascript:void(0)" id="aTopLoginQQClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a></li>
                <li><strong class="green font14">乡村旅游第一网已与腾讯合作，支持QQ号码直接登录。</strong></li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLoginQQ" name="main" width="550" height="520" style="overflow: hidden; border: none;" frameborder="no"></iframe>
        </div>
    </div>
    <!--SINA LOGIN-->
    <script type="text/javascript">
        var openDivLoginSina;
        $(document).ready(function () {
            openDivLoginSina = new PopupLayer({ trigger: "#aTopLoginSina", popupBlk: "#blkTopLoginSina", closeBtn: "#aTopLoginSinaClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLoginSina.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLoginSina").src = '<%=WEBSITE_USRE_DOMAIN %>/logintosina.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=opendiv';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLoginSina" class="blk" style="width:575px;height:420px">
        <div class="popup_title">
            <span class="f_right"><a href="javascript:void(0)" id="aTopLoginSinaClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a></li>
                <li><strong class="green font14">乡村旅游第一网已与新浪微博合作，支持新浪微博帐号直接登录。</strong></li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLoginSina" name="main" width="570" height="370" style="overflow: hidden; border: none;" frameborder="no"></iframe>
        </div>
    </div>
    <!--RENREN LOGIN-->
    <script type="text/javascript">
        var openDivLoginRenren;
        $(document).ready(function () {
            openDivLoginRenren = new PopupLayer({ trigger: "#aTopLoginRenren", popupBlk: "#blkTopLoginRenren", closeBtn: "#aTopLoginRenrenClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLoginRenren.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLoginRenren").src = '<%=WEBSITE_USRE_DOMAIN %>/renrencallback.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=opendiv';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLoginRenren" class="blk" style="width:585px;height:400px">
        <div class="popup_title">
            <span class="f_right"><a href="javascript:void(0)" id="aTopLoginRenrenClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a></li>
                <li><strong class="green font14">乡村旅游第一网已与人人网合作，支持人人帐号直接登录。</strong></li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLoginRenren" name="main" width="580" height="370" style="overflow: hidden; border: none;" frameborder="no"></iframe>
        </div>
    </div>

<div class="w1003" id="Header">
    <div class="logo">
        <a href="/">
            <img src="<%=WEBSITE_IMAGE_DOMAIN %>/Images/logo/<%=WEBSITE_CODE %>/logoIndex.jpg" width="239px" height="66px" alt="<%=WEBSITE_NAME %>" /></a>
    </div>
    <div class="hidden_menu">
        <div style="float:right">
            <iframe src="http://www.thinkpage.cn/weather/weather.aspx?uid=&c=CHXX0008&l=zh-CHS&p=CMA&a=1&u=C&s=31&m=0&x=0&d=1&fc=&bgc=&bc=&ti=1&in=1&li=2&ct=iframe" frameborder="0" scrolling="no" width="150" height="80" allowTransparency="true"></iframe>
        </div>
        <div class="provines">
            <dl>
                <dt>
                    <strong><a href="/" title="<%=WEBSITE_AREA_NAME%>"><%=WEBSITE_AREA_NAME%></a></strong>
                    &nbsp;-&nbsp;<span><%=WEBSITE_FOCUS_CITY_NAME%></span>
                </dt>
                <%
                        for (int i = 0; i < listArea.Count; i++)
                        {
                %>
                <dd>
                    <a href="/<%=listArea[i].AREA_NAME_PINYIN %>/" title="<%=listArea[i].AREA_NAME%>">
                        <%=listArea[i].AREA_NAME%></a></dd>
                <% 
                        }
                %>
            </dl>
        </div>
        <script type="text/javascript">
            ShowHeaderMoreArea = function () {
                $('#divHeaderMoreArea').show("slow", "");
            }
            HideHeaderMoreArea = function () {
                $('#divHeaderMoreArea').hide("slow", "");
            }
        </script>
        <%
            if (listArea.Count > 18)
            {
        %>
        <div>&nbsp;&nbsp;&nbsp;&nbsp;<a onmouseover="ShowHeaderMoreArea()" style="cursor:pointer">更多区域...</a></div>
        <div id="divHeaderMoreArea" style="display:none;position:absolute; top:103px; width:auto; height:auto; padding:5px; border:solid 1px #aaa; background-color:#fff; z-index:99;">
            <p style="padding-right:5px;text-align:right"><a onclick="HideHeaderMoreArea()" style="cursor:pointer;background-color:#13b802;padding:1px 2px; color:#fff">关闭</a></p>
            <div class="provines">
                <dl style="height:auto">
                    <%
            for (int i = 18; i < listArea.Count; i++)
            {
                    %>
                    <dd>
                        <a href="/<%=listArea[i].AREA_NAME_PINYIN %>/" title="<%=listArea[i].AREA_NAME%>">
                            <%=listArea[i].AREA_NAME%></a></dd>
                    <% 
            }
                    %>
                </dl>
            </div>
        </div>
        <%
            }
        %>
        <div class="clear">
        </div>
    </div>
    
</div>
<!--end Header-->
<div class="w1003" id="nav">
    <ul>
        <li class="nav_hover"><a href="<%if(WEBSITE_FOCUS_CITY_CODE!="") Response.Write("/"+WEBSITE_FOCUS_CITY_NAME_PINYIN); %>/njxy/">农家小院</a></li>
        <li><a href="<%if(WEBSITE_FOCUS_CITY_CODE!="") Response.Write("/"+WEBSITE_FOCUS_CITY_NAME_PINYIN); %>/djsz/">度假山庄</a></li>
        <li><a href="<%if(WEBSITE_FOCUS_CITY_CODE!="") Response.Write("/"+WEBSITE_FOCUS_CITY_NAME_PINYIN); %>/dfts/">地方特色</a></li>
        <li><a href="<%if(WEBSITE_FOCUS_CITY_CODE!="") Response.Write("/"+WEBSITE_FOCUS_CITY_NAME_PINYIN); %>/jdms/">景点名胜</a></li>
        <li><a target="_blank" href="/xckb/">乡村快报</a></li>
    </ul>
    <p class="member_login">
        <marquee direction="left" height="41px" scrollamount="1" onmouseover="this.stop()" onmouseout="this.start()"">
            <span>
            <asp:Repeater runat="server" ID="rptNotice" EnableViewState="False">
                <ItemTemplate>
                    <a target="_blank" href="/xtgg/<%#Eval("ID") %>.html" title="<%#Eval("ANNOUNCEMENT_NAME") %>">
                        <%#PageValidate.SqlText(Eval("ANNOUNCEMENT_NAME").ToString(), 15)%>
                    </a>
                </ItemTemplate>
            </asp:Repeater>
            </span>
        </marquee>
    </p>
</div>
<!--end Nav-->
